<template>
    <div>
        <div id="slider" class="mui-slider">
            <div id="sliderSegmentedControl" class="mui-scroll-wrapper mui-slider-indicator mui-segmented-control mui-segmented-control-inverted">
                <div class="mui-scroll">
                    <a class="mui-control-item mui-active" href="#item1mobile">
                        全部
                    </a>
                    <a class="mui-control-item" href="#item1mobile">
                        推荐
                    </a>
                    <a class="mui-control-item" href="#item2mobile">
                        热点
                    </a>
                    <a class="mui-control-item" href="#item3mobile">
                        北京
                    </a>
                    <a class="mui-control-item" href="#item4mobile">
                        社会
                    </a>
                    <a class="mui-control-item" href="#item5mobile">
                        娱乐
                    </a>
                </div>
            </div>
        </div>
        <ul class="photo-list">
            <router-link :to="'/home/photoInfo/:' + item.id" v-for="item in photoList" :key="item.id" tag="li">
                <img v-lazy="item.url">
            </router-link>
        </ul>
    </div>
</template>

<script>
    import mui from '../../../../lib/mui/js/mui.min'

    export default {
        data(){
            return {
                photoList : [
                    {id : 1,url: 'https://img03.sogoucdn.com/app/a/100520093/ac75323d6b6de243-503c0c74be6ae02f-bcbd2069b4fb47008fd55f36a471ad62.jpg'},
                    {id : 2,url: 'https://img01.sogoucdn.com/app/a/100520093/dc72c3c04ef01fdf-22176402958c6b80-80a5275c1bf37699f853ef914b7f666e.jpg'},
                    {id : 3,url: 'https://img01.sogoucdn.com/app/a/100520093/9d9670381a07ef61-24195ef2cdc65593-9581c11cc8e3b086fca582e72519ed9b.jpg'}
                ]
            }
        },
        methods : {

        },
        mounted(){
            mui('.mui-scroll-wrapper').scroll({
                deceleration: 0.0005 //flick 减速系数，系数越大，滚动速度越慢，滚动距离越小，默认值0.0006
            });
        }
    }
</script>

<style scoped lang="less">
    * {
        touch-action: pan-y;
    }
    .photo-list {
        list-style: none;
        margin: 0;
        padding: 10px;
        padding-bottom: 0;
        li {
            background-color: #ccc;
            text-align: center;
            margin-bottom: 10px;
            box-shadow: 0 0 9px #999;
            position: relative;
            img {
                width: 100%;
                vertical-align: middle;
            }
            img[lazy="loading"] {
                width: 40px;
                height: 300px;
                margin: auto;
            }
        }
    }
</style>